﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class SGDConfigers : IEntityTypeConfiguration<SGD>
    {
        public void Configure(EntityTypeBuilder<SGD> builder)
        {
            builder.ToTable(nameof(SGD));
            builder.Property(x => x.SalaryGrantId).IsRequired(false).HasMaxLength(30);
            builder.Property(x => x.HumanId).IsRequired(false).HasMaxLength(30);
            builder.Property(x => x.HumanName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.BounsSum).IsRequired(false);
            builder.Property(x => x.SaleSum).IsRequired(false);
            builder.Property(x => x.DeductSum).IsRequired(false);
            builder.Property(x => x.SalaryStandardSum).IsRequired(false);
            builder.Property(x => x.SalaryPaidSum).IsRequired(false);
        }
    }
}
